<?php
class Subcategorymanager_Model_Deletesubcategorydata implements Subcategorymanager_Model_Mainable{
    
    private $excepted_result = 1;
    private $delete_subcategory_result;
    private $subcategorymanager_data_deletesubcategorydata;
    
    public function __construct() {
        $this->subcategorymanager_data_deletesubcategorydata = new Subcategorymanager_Data_Deletesubcategorydata;
    }
    
    public function main(array $variables = null) {
        $this->delete_subcategory_result = $this->subcategorymanager_data_deletesubcategorydata->main($variables);
        if(
                $this->delete_subcategory_result == $this->excepted_result
                ){
            header("Location: ".SITE_ROOT."zarzadzaj-podkategoriami.html");
        }
        else {
            header("Location: ".SITE_ROOT."zarzadzaj-podkategoriami.html");
        }
    }

}
